<?php
  
  Test::Begin('ID from int');
  $x = new ID(3);
  Test::AssertEqual(3, $x->AsInt());
  
  Test::Begin('ID from hex (positive)');
  $x = new ID('00000003');
  Test::AssertEqual(3, $x->AsInt());
  
  Test::Begin('ID from hex (negative)');
  $x = new ID('F0000003');
  Test::AssertEqual('F0000003', $x->AsHex());
  
  Test::Begin('ID hashing');
  $x1 = ID::Hash('whatever');
  $x2 = ID::Hash('whatever');
  Test::AssertEqual($x1->AsHex(), $x2->AsHex());
  
  
?>
